package com.bkitmobile.kesu.android.GUI;


import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class FindLocationInputDialog extends Dialog{
	private Context context;
	private Button btnOk, btnCancel;
	private EditText txtKeyword, txtDistance;
	
	public FindLocationInputDialog(Context context) {
		super(context);
		this.context = context;
		
	}
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.location__find_location_input);
		setTitle("foo");
		btnOk = (Button) findViewById(R.id.location_input_ok);
		btnCancel = (Button) findViewById(R.id.location_input_cancel);
		txtKeyword =  (EditText) findViewById(R.id.location_input_keyword);
		txtDistance = (EditText) findViewById(R.id.location_input_distance);
		
		this.setCanceledOnTouchOutside(true);
		this.setCancelable(true);
		ButtonClickListener btnClick = new ButtonClickListener();
		btnOk.setOnClickListener(btnClick);
		btnCancel.setOnClickListener(btnClick);
	}
	
	private class ButtonClickListener implements android.view.View.OnClickListener{

		public void onClick(View v) {
			if(v == btnOk){
				//TODO: check data
				//TODO: update friends list
				
			}
			
			FindLocationInputDialog.this.dismiss();
			
		}
		
	}

}
